<?php namespace Modules\Core\Cms\Helper\Admin\Edit;

use Core\Myapp\Zobero;

class Form extends Zobero
{
    public function initForm($form, $data)
    {
        $form->addGroup('general', 'General', 0);
        $form->getGroup('general')->addField(
            array(
                'name'           => 'title',
                'type'           => 'text',
                'label'          => 'Title',
                'placeholder'    => 'Title',
                'id'             => '',
                'class'          => '',
                'required'       => true
            )
        );
        $form->getGroup('general')->addField(
            array(
                'name'           => 'seo_key',
                'type'           => 'text',
                'label'          => 'SEO Key',
                'placeholder'    => 'SEO Key',
                'id'             => '',
                'class'          => '',
                'required'       => true
            )
        );
        $form->getGroup('general')->addField(
            array(
                'name'     => 'content',
                'type'     => 'textarea',
                'label'    => 'Content',
                'id'       => '',
                'class'    => 'tinicme',
                'required' => true
            )
        );
        $form->getGroup('general')->addField(
            array(
                'name'       => 'status',
                'type'       => 'select',
                'label'      => 'Status',
                'id'         => '',
                'class'      => '',
                'required'   => true,
                'options'    => array(
                    'enable' =>'Enable',
                    'disable'=>'Disable'
                )
            )
        );
        $form->getGroup('general')->addField(
            array(
                'name'     => 'layout',
                'type'     => 'select',
                'label'    => 'Layout',
                'id'       => '',
                'class'    => '',
                'required' => true,
                'options'  => array(
                    'one-column'        =>'One Column',
                    'two-columns-left'  =>'Two Columns Left',
                    'two-columns-right' =>'Two Columns Right',
                    'three-columns'     =>'Three Columns',
                )
            )
        );
        $form->setData($data);
    }
}